<?php

class Core_Controller_Admin_Settings_Mailtemplate extends Controller
{
	public function indexAction()
	{
		$table = Nuo::getTable('core@mail.template');

		$select = $table -> select();

		$this -> paginator = $paginator = Zend_Paginator::factory($select);

		$paginator -> setCurrentPageNumber($this -> _request -> getParam('page', 1));
	}

	public function editAction()
	{
		$this -> form = $form = Nuo::getForm('core@admin.settings.mailtemplate.edit');

		$request = $this -> getRequest();

		if ($request -> isPost() and $form -> isValid($request -> getPost()))
		{
			$form -> doCommit();
		}
	}

}
